const path = require("path");

module.exports = [
  [
    "container",
    {
      type: "right",
      defaultTitle: "",
    },
  ],
  [
    "container",
    {
      type: "theorem",
      before: (info) => `<div class="theorem"><p class="title">${info}</p>`,
      after: "</div>",
    },
  ],

  // 兼容pwa
  [
    "@vuepress/pwa",
    {
      serviceWorker: true,
      updatePopup: {
        message: "发现新内容可用",
        buttonText: "刷新",
      },
    },
  ],
  // 点击赋值
  [
    "one-click-copy",
    {
      copySelector: [
        'div[class*="language-"] pre',
        'div[class*="aside-code"] aside',
      ], // String or Array
      copyMessage: "复制成功!", // default is 'Copied successfully!'
      toolTipMessage: "点击复制", // default is ''Copy to clipboard'
      duration: 800, // prompt message display time
    },
  ],
  // ['vuepress-plugin-code-copy', {align: "top", staticIcon: true}],
  //右键复制
  [
    "copyright",
    {
      minLength: 10,
      clipboardComponent: path.resolve(
        __dirname,
        "../components/Copyright.vue"
      ),
    },
  ],
  //用于平滑滚动的 VuePress 插件
  ["vuepress-plugin-smooth-scroll"],
  //埋点工具
  [
    "@vuepress/google-analytics",
    {
      ga: "UA-176000000-1",
    },
  ],
  //趣味网页标题
  [
    "dynamic-title",
    {
      showIcon: "https://savethink0711.gitee.io/source/img/head.jpg",
      showText: "(/≧▽≦/)欢迎回来！",
      hideIcon: "https://savethink0711.gitee.io/source/img/head.jpg",
      hideText: "(●—●)别走！",
      recoverTime: 2000,
    },
  ],
  // 音乐播放器插件
  [
    "meting",
    {
      meting: {
        server: "netease", //网易云
        type: "playlist", //歌单类型
        mid: "6838211960", //歌单id
        // 自动播放，默认为 true
      },
      aplayer: {
        lrcType: 0, //歌词类型
        // 音量
        volume: 0.15,
        // 开启迷你模式
        mini: true,
        autoplay: true, //自动播放
      },
      defaultCover: "https://nyakku.moe/avatar.jpg",
    },
  ],
  // 鼠标特效插件
  [
    "cursor-effects",
    {
      size: 1.75,
      shape: "star",
    },
  ],
  // 悬挂小猫返回顶部
  // ["go-top"],
  //名人名言
  "vuepress-plugin-boxx",
  //图片懒加载
  ["img-lazy"],
];
